package com.iworkh.spring.aop.anno;

import com.iworkh.spring.aop.anno.aspect.LoggerAspect;
import com.iworkh.spring.aop.anno.biz.service.IService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * 入口类
 *
 * @author: iworkh-沐雨云楼
 * @date: 2019-12-19
 */

@Configuration
@ComponentScan(basePackages = "com.iworkh.spring.aop.anno")
@EnableAspectJAutoProxy
public class App {

    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(App.class);
        IService service = (IService) context.getBean("bookService");
        // service.delete("1");
        // service.delete(null);
        service.get("1");
    }
}
